<template>
	<view class="groupbuy">
			<view class="h2">团购专区</view>
			<view class="groupbuy-product" >
				<block v-for="(item,iundex) in grouponList">
				<u-line length="96vw" margin="20rpx 0rpx"></u-line>
				<u-row gutter="10" class="row">
					<u-col span="4">
						<view class="product-img">
							<view class="spantext">{{item.grouponMember}}人拼团</view>
							<view class="date-text">{{item.expireTime}}</view>
							<image :src="item.picUrl"></image>
							</view></u-col>
					<u-col span="8">
						<view class="product-right">
							<view class="h4">
								{{item.name}}
								
							</view>
							<view class="text-present">{{item.brief}}</view>
							<view class="product-price">
								<text class="current-price ">现价：￥{{item.grouponDiscount}}</text>
								<text class="group-price ">团购价：￥{{item.grouponPrice}}</text>
							</view>
						</view>
					</u-col>
				</u-row>
				</block>
			</view>
		</view>
	
</template>

<script>
	export default {
		props:{
			grouponList:{
				type:Array
			}
		},
		data() {
			return {
				
			}
		},
	}
</script>

<style lang="scss" scoped>
	$marginBottom: 30rpx;
	$backColor: #f4f4f4;
	@import 'uview-ui/index.scss';
	.groupbuy {
			padding: 0px 10rpx;
			margin-top: 20rpx;
			background-color: $uni-bg-color;
			.row{
				padding-bottom: 20rpx;
			}
			.h2 {
				line-height: 60px;
				text-align: center;
				font-size: 35rpx;
			}
			.groupbuy-product {
				.product-img{
					position: relative;
					overflow: hidden;
					image{
						width:30vw;
						height: 20vh;
						z-index: -1;
					}
					.spantext {
						top: 0;
						right: 0;
						position: absolute;
						font-size: 25rpx;
						color: #ffffff;
						padding: 2rpx 5rpx;
						background-color: #eb7153;
						border-radius: 10rpx;
					}
					.date-text {
						position: absolute;
						font-size: 20rpx;
						padding: 5rpx 20rpx;
						background-color: #f09c42;
						display: inline-block;
						border-radius: 20rpx;
						color: #ffffff;
						bottom: 0;
					}
				}
				.product-right {
					.h4 {
						display: flex;
						font-size: 30rpx;
					}
					
					.text-present {
						margin: 10rpx 0;
						font-size: 25rpx;
					}
					.product-price {
						.current-price {
							margin-right: 30rpx;
							color: #666666;
							text-decoration: line-through;
						}
						.group-price {
							color: #f09c42;
						}
					}
				}
			}
		}
	
</style>
